/*
 *  Copyright (C) 2010 Glauco
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.balisunrise.bindings;

/**
 * Esta Interface faz um vinculo entre um objeto de origem e outro de destino.
 * O Vinculo pode ser mutuo, ou seja de source para targer e de target para
 * souce, ou pode ser exclusivo, apena source para target.
 * Esta Interface eh utlizada pelo BindingGroup, o qual controla um conjunto
 * de Bindings, ativando o vinculo e o desfazendo quando necessario.
 *
 * @author Glauco Knihs
 * @param <S> Source
 * @param <P> Tipo de dado da Propriedade do Source
 * @param <T> Target
 * @param <D> Tipo de dado da Propriedade do Target
 */
public interface Binding<S,P,T,D> 
        extends org.balisunrise.common.Binding<S, P, T, D>{

    /**
     * Retorna o Suporte de Vinculo do source.
     */
    public BindingSupport<P> getSourceSupport();

    /**
     * Atribui o Suporte de Vinculo do source.
     */
    public void setSourceSupport(BindingSupport<P> sourceSupport);

    /**
     * Retorna o gatilho de vinculo do source.
     */
    public BindingTrigger getSourceTrigger();

    /**
     * Atribui o gatilho de vinculo do source.
     */
    public void setSourceTrigger(BindingTrigger sourceTrigger);

    /**
     * Retorna o Suporte de Vinculo do target.
     */
    public BindingSupport<D> getTargetSupport();

    /**
     * Atribui o Suporte de Vinculo do target.
     */
    public void setTargetSupport(BindingSupport<D> targetSupport);

    /**
     * Retorna o gatilho de vinculo do target.
     */
    public BindingTrigger getTargetTrigger();

    /**
     * Atribui o gatilho de vinculo do target.
     */
    public void setTargetTrigger(BindingTrigger targetTrigger);

}
